.class public Lrexsee/open/OpenUtilities;
.super Ljava/lang/Object;
.source "OpenUtilities.java"


# direct methods
.method public constructor <init>()V
    .locals 0

    .prologue
    .line 10
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public static initJavaScriptInterface(Lrexsee/core/browser/Browser;)V
    .locals 2
    .param p0, "browser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 76
    iget-object v0, p0, Lrexsee/core/browser/Browser;->interfaceList:Lrexsee/core/browser/clazz/JavascriptInterfaceList;

    new-instance v1, Lrexsee/open/RexseeSinaWeibo;

    invoke-direct {v1, p0}, Lrexsee/open/RexseeSinaWeibo;-><init>(Lrexsee/core/browser/Browser;)V

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/JavascriptInterfaceList;->add(Lrexsee/core/browser/clazz/JavascriptInterface;)V

    .line 77
    iget-object v0, p0, Lrexsee/core/browser/Browser;->interfaceList:Lrexsee/core/browser/clazz/JavascriptInterfaceList;

    new-instance v1, Lrexsee/open/RexseeTencentWeibo;

    invoke-direct {v1, p0}, Lrexsee/open/RexseeTencentWeibo;-><init>(Lrexsee/core/browser/Browser;)V

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/JavascriptInterfaceList;->add(Lrexsee/core/browser/clazz/JavascriptInterface;)V

    .line 78
    iget-object v0, p0, Lrexsee/core/browser/Browser;->interfaceList:Lrexsee/core/browser/clazz/JavascriptInterfaceList;

    new-instance v1, Lrexsee/open/RexseeBaidu;

    invoke-direct {v1, p0}, Lrexsee/open/RexseeBaidu;-><init>(Lrexsee/core/browser/Browser;)V

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/JavascriptInterfaceList;->add(Lrexsee/core/browser/clazz/JavascriptInterface;)V

    .line 79
    iget-object v0, p0, Lrexsee/core/browser/Browser;->interfaceList:Lrexsee/core/browser/clazz/JavascriptInterfaceList;

    new-instance v1, Lrexsee/open/RexseeRenRenSNS;

    invoke-direct {v1, p0}, Lrexsee/open/RexseeRenRenSNS;-><init>(Lrexsee/core/browser/Browser;)V

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/JavascriptInterfaceList;->add(Lrexsee/core/browser/clazz/JavascriptInterface;)V

    .line 80
    return-void
.end method

.method public static initMenu(Lrexsee/core/browser/Browser;)V
    .locals 13
    .param p0, "browser"    # Lrexsee/core/browser/Browser;

    .prologue
    const-string v12, "common_menu_share"

    const-string v11, "label:"

    const-string v10, ";"

    .line 14
    const-string v4, "share_menu"

    .line 15
    .local v4, "shareMenuId":Ljava/lang/String;
    const-string v2, "common_menu_share"

    .line 16
    .local v2, "menuId":Ljava/lang/String;
    invoke-virtual {p0}, Lrexsee/core/browser/Browser;->getContext()Landroid/content/Context;

    move-result-object v0

    .line 18
    .local v0, "context":Landroid/content/Context;
    new-instance v3, Lrexsee/core/menu/PopMenu;

    const-string v5, "share_menu"

    new-instance v6, Ljava/lang/StringBuilder;

    const-string v7, "label:"

    invoke-direct {v6, v11}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    sget-object v7, Lrexsee/core/lang/RexseeLanguage;->ACTION_SHARE:Ljava/lang/String;

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    const-string v7, ";"

    invoke-virtual {v6, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-direct {v3, p0, v5, v6}, Lrexsee/core/menu/PopMenu;-><init>(Lrexsee/core/browser/Browser;Ljava/lang/String;Ljava/lang/String;)V

    .line 19
    .local v3, "shareMenu":Lrexsee/core/menu/PopMenu;
    invoke-static {p0}, Lrexsee/open/RexseeSinaWeibo;->getPopMenuItem(Lrexsee/core/browser/Browser;)Lrexsee/core/menu/PopMenuItem;

    move-result-object v5

    invoke-virtual {v3, v5}, Lrexsee/core/menu/PopMenu;->add(Lrexsee/core/menu/PopMenuItem;)V

    .line 20
    invoke-static {p0}, Lrexsee/open/RexseeTencentWeibo;->getPopMenuItem(Lrexsee/core/browser/Browser;)Lrexsee/core/menu/PopMenuItem;

    move-result-object v5

    invoke-virtual {v3, v5}, Lrexsee/core/menu/PopMenu;->add(Lrexsee/core/menu/PopMenuItem;)V

    .line 21
    invoke-static {p0}, Lrexsee/open/RexseeRenRenSNS;->getPopMenuItem(Lrexsee/core/browser/Browser;)Lrexsee/core/menu/PopMenuItem;

    move-result-object v5

    invoke-virtual {v3, v5}, Lrexsee/core/menu/PopMenu;->add(Lrexsee/core/menu/PopMenuItem;)V

    .line 22
    iget-object v5, p0, Lrexsee/core/browser/Browser;->menu:Lrexsee/core/menu/RexseeMenu;

    iget-object v5, v5, Lrexsee/core/menu/RexseeMenu;->menus:Lrexsee/core/menu/PopMenus;

    invoke-virtual {v5, v3}, Lrexsee/core/menu/PopMenus;->add(Lrexsee/core/menu/PopMenu;)V

    .line 24
    new-instance v1, Lrexsee/core/menu/PopMenu;

    const-string v5, "common_menu_share"

    new-instance v5, Ljava/lang/StringBuilder;

    const-string v6, "label:"

    invoke-direct {v5, v11}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    sget-object v6, Lrexsee/core/lang/RexseeLanguage;->TITLE_MENU:Ljava/lang/String;

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, ";"

    invoke-virtual {v5, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-direct {v1, p0, v12, v5}, Lrexsee/core/menu/PopMenu;-><init>(Lrexsee/core/browser/Browser;Ljava/lang/String;Ljava/lang/String;)V

    .line 25
    .local v1, "menu":Lrexsee/core/menu/PopMenu;
    new-instance v5, Lrexsee/core/menu/PopMenuItem;

    sget-object v6, Lrexsee/core/lang/RexseeLanguage;->ACTION_RELOAD:Ljava/lang/String;

    new-instance v7, Lrexsee/open/OpenUtilities$1;

    invoke-direct {v7, p0}, Lrexsee/open/OpenUtilities$1;-><init>(Lrexsee/core/browser/Browser;)V

    .line 30
    new-instance v8, Ljava/lang/StringBuilder;

    const-string v9, "label:"

    invoke-direct {v8, v11}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    sget-object v9, Lrexsee/core/lang/RexseeLanguage;->ACTION_RELOAD:Ljava/lang/String;

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    const-string v9, ";"

    invoke-virtual {v8, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v8

    invoke-direct {v5, v0, v6, v7, v8}, Lrexsee/core/menu/PopMenuItem;-><init>(Landroid/content/Context;Ljava/lang/String;Ljava/lang/Runnable;Ljava/lang/String;)V

    .line 25
    invoke-virtual {v1, v5}, Lrexsee/core/menu/PopMenu;->add(Lrexsee/core/menu/PopMenuItem;)V

    .line 31
    new-instance v5, Lrexsee/core/menu/PopMenuItem;

    sget-object v6, Lrexsee/core/lang/RexseeLanguage;->ACTION_BACK:Ljava/lang/String;

    new-instance v7, Lrexsee/open/OpenUtilities$2;

    invoke-direct {v7, p0}, Lrexsee/open/OpenUtilities$2;-><init>(Lrexsee/core/browser/Browser;)V

    .line 36
    new-instance v8, Ljava/lang/StringBuilder;

    const-string v9, "label:"

    invoke-direct {v8, v11}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    sget-object v9, Lrexsee/core/lang/RexseeLanguage;->ACTION_BACK:Ljava/lang/String;

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    const-string v9, ";"

    invoke-virtual {v8, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v8

    invoke-direct {v5, v0, v6, v7, v8}, Lrexsee/core/menu/PopMenuItem;-><init>(Landroid/content/Context;Ljava/lang/String;Ljava/lang/Runnable;Ljava/lang/String;)V

    .line 31
    invoke-virtual {v1, v5}, Lrexsee/core/menu/PopMenu;->add(Lrexsee/core/menu/PopMenuItem;)V

    .line 37
    new-instance v5, Lrexsee/core/menu/PopMenuItem;

    sget-object v6, Lrexsee/core/lang/RexseeLanguage;->ACTION_FORWARD:Ljava/lang/String;

    new-instance v7, Lrexsee/open/OpenUtilities$3;

    invoke-direct {v7, p0}, Lrexsee/open/OpenUtilities$3;-><init>(Lrexsee/core/browser/Browser;)V

    .line 42
    new-instance v8, Ljava/lang/StringBuilder;

    const-string v9, "label:"

    invoke-direct {v8, v11}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    sget-object v9, Lrexsee/core/lang/RexseeLanguage;->ACTION_FORWARD:Ljava/lang/String;

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    const-string v9, ";"

    invoke-virtual {v8, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v8

    invoke-direct {v5, v0, v6, v7, v8}, Lrexsee/core/menu/PopMenuItem;-><init>(Landroid/content/Context;Ljava/lang/String;Ljava/lang/Runnable;Ljava/lang/String;)V

    .line 37
    invoke-virtual {v1, v5}, Lrexsee/core/menu/PopMenu;->add(Lrexsee/core/menu/PopMenuItem;)V

    .line 43
    new-instance v5, Lrexsee/core/menu/PopMenuItem;

    sget-object v6, Lrexsee/core/lang/RexseeLanguage;->ACTION_SHARE:Ljava/lang/String;

    new-instance v7, Lrexsee/open/OpenUtilities$4;

    invoke-direct {v7, p0}, Lrexsee/open/OpenUtilities$4;-><init>(Lrexsee/core/browser/Browser;)V

    .line 48
    new-instance v8, Ljava/lang/StringBuilder;

    const-string v9, "label:"

    invoke-direct {v8, v11}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    sget-object v9, Lrexsee/core/lang/RexseeLanguage;->ACTION_SHARE:Ljava/lang/String;

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    const-string v9, ";"

    invoke-virtual {v8, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v8

    invoke-direct {v5, v0, v6, v7, v8}, Lrexsee/core/menu/PopMenuItem;-><init>(Landroid/content/Context;Ljava/lang/String;Ljava/lang/Runnable;Ljava/lang/String;)V

    .line 43
    invoke-virtual {v1, v5}, Lrexsee/core/menu/PopMenu;->add(Lrexsee/core/menu/PopMenuItem;)V

    .line 49
    new-instance v5, Lrexsee/core/menu/PopMenuItem;

    sget-object v6, Lrexsee/core/lang/RexseeLanguage;->ACTION_QUIT:Ljava/lang/String;

    new-instance v7, Lrexsee/open/OpenUtilities$5;

    invoke-direct {v7, p0}, Lrexsee/open/OpenUtilities$5;-><init>(Lrexsee/core/browser/Browser;)V

    .line 54
    new-instance v8, Ljava/lang/StringBuilder;

    const-string v9, "label:"

    invoke-direct {v8, v11}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    sget-object v9, Lrexsee/core/lang/RexseeLanguage;->ACTION_QUIT:Ljava/lang/String;

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    const-string v9, ";"

    invoke-virtual {v8, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v8

    invoke-direct {v5, v0, v6, v7, v8}, Lrexsee/core/menu/PopMenuItem;-><init>(Landroid/content/Context;Ljava/lang/String;Ljava/lang/Runnable;Ljava/lang/String;)V

    .line 49
    invoke-virtual {v1, v5}, Lrexsee/core/menu/PopMenu;->add(Lrexsee/core/menu/PopMenuItem;)V

    .line 55
    new-instance v5, Lrexsee/core/menu/PopMenuItem;

    sget-object v6, Lrexsee/core/lang/RexseeLanguage;->TITLE_ABOUT:Ljava/lang/String;

    new-instance v7, Lrexsee/open/OpenUtilities$6;

    invoke-direct {v7, p0}, Lrexsee/open/OpenUtilities$6;-><init>(Lrexsee/core/browser/Browser;)V

    .line 60
    new-instance v8, Ljava/lang/StringBuilder;

    const-string v9, "label:"

    invoke-direct {v8, v11}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    sget-object v9, Lrexsee/core/lang/RexseeLanguage;->TITLE_ABOUT:Ljava/lang/String;

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    const-string v9, ";"

    invoke-virtual {v8, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v8

    invoke-direct {v5, v0, v6, v7, v8}, Lrexsee/core/menu/PopMenuItem;-><init>(Landroid/content/Context;Ljava/lang/String;Ljava/lang/Runnable;Ljava/lang/String;)V

    .line 55
    invoke-virtual {v1, v5}, Lrexsee/core/menu/PopMenu;->add(Lrexsee/core/menu/PopMenuItem;)V

    .line 61
    iget-object v5, p0, Lrexsee/core/browser/Browser;->application:Lrexsee/core/application/RexseeApplication;

    iget-object v5, v5, Lrexsee/core/application/RexseeApplication;->resources:Lrexsee/core/application/Resource;

    iget-object v5, v5, Lrexsee/core/application/Resource;->home:Ljava/lang/String;

    const-string v6, ""

    invoke-virtual {v5, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v5

    if-eqz v5, :cond_0

    .line 62
    new-instance v5, Lrexsee/core/menu/PopMenuItem;

    sget-object v6, Lrexsee/core/lang/RexseeLanguage;->ACTION_SETUP:Ljava/lang/String;

    new-instance v7, Lrexsee/open/OpenUtilities$7;

    invoke-direct {v7, p0}, Lrexsee/open/OpenUtilities$7;-><init>(Lrexsee/core/browser/Browser;)V

    .line 67
    new-instance v8, Ljava/lang/StringBuilder;

    const-string v9, "label:"

    invoke-direct {v8, v11}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    sget-object v9, Lrexsee/core/lang/RexseeLanguage;->ACTION_SETUP:Ljava/lang/String;

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    const-string v9, ";"

    invoke-virtual {v8, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v8

    invoke-direct {v5, v0, v6, v7, v8}, Lrexsee/core/menu/PopMenuItem;-><init>(Landroid/content/Context;Ljava/lang/String;Ljava/lang/Runnable;Ljava/lang/String;)V

    .line 62
    invoke-virtual {v1, v5}, Lrexsee/core/menu/PopMenu;->add(Lrexsee/core/menu/PopMenuItem;)V

    .line 70
    :cond_0
    iget-object v5, p0, Lrexsee/core/browser/Browser;->menu:Lrexsee/core/menu/RexseeMenu;

    iget-object v5, v5, Lrexsee/core/menu/RexseeMenu;->menus:Lrexsee/core/menu/PopMenus;

    invoke-virtual {v5, v1}, Lrexsee/core/menu/PopMenus;->add(Lrexsee/core/menu/PopMenu;)V

    .line 71
    invoke-virtual {p0}, Lrexsee/core/browser/Browser;->getContext()Landroid/content/Context;

    move-result-object v5

    const-string v6, "ShareMenuEnabled"

    const/4 v7, 0x0

    invoke-static {v5, v6, v7}, Lrexsee/core/application/Resource;->isEnabled(Landroid/content/Context;Ljava/lang/String;Z)Z

    move-result v5

    if-eqz v5, :cond_1

    iget-object v5, p0, Lrexsee/core/browser/Browser;->menu:Lrexsee/core/menu/RexseeMenu;

    const-string v6, "common_menu_share"

    invoke-virtual {v5, v12}, Lrexsee/core/menu/RexseeMenu;->setOptionsMenuId(Ljava/lang/String;)V

    .line 73
    :cond_1
    return-void
.end method
